<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
	<title>Googlepedia</title>	
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
	<script>document.location.href = 'http://www.limaromeo.com/googlepedia';</script>
	<style type="text/css">
		* { margin: 0; padding: 0;}
		body {
			font-family: Arial, Helvetica, sans-serif;
			background: url(bg.png) repeat-x;
		}
		
		h1 { 
			text-align: center;
			margin-bottom: 1em;
		}
		
		#wrapper {
			width: 600px;
			margin: 30px auto;
		}
		select {
			font-size: 1.3em;
		}
		select option {
			padding-right: 10px;
			padding-left: 10px;
		}
		input {
			font-size: 1.3em;
		}
		input.value {
			width: 70px;
		}
		h2 {
			margin-bottom: 0.4em;
			margin-top: 1.2em;
			border-bottom: 1px solid #ccc;
			font-weight: normal;
		}
		p {
			margin-bottom: 0.6em;
		}
	</style>	
	<script src="http://www.google.com/jsapi?key=ABQIAAAA65bRbJEVunWy4N7aK13VHhSlYZIvVJq3l2k9Vt3BLWczk1ZlYBRbucH-CUt1lw7nC_FccrUWQP68aQ" type="text/javascript"></script>
	<script type="text/javascript">
		//<![CDATA[
		var euro = {
			currency: 'EUR',
			amount: '30',
			pre: '€',
			post: ''
		}
		
		var donationData = {
			GB: {
				currency: 'GBP',
				amount: '30',
				pre: '£',
				post: ''
			},
			AU: {
				currency: 'AUD',
				amount: '60',
				pre: '$',
				post: ' (Australian)'
			},
			CA: {
				currency: 'CAD',
				amount: '50',
				pre: '$',
				post: ' (Canadian)'
			},
			// countries using the euro
			AT: euro,
			BE: euro,
			AN: euro,
			FI: euro,
			FR: euro,
			DE: euro,
			IE: euro,
			IT: euro,
			LU: euro,
			PT: euro,
			ES: euro,
			GR: euro,
			SI: euro,
			CY: euro,
			MT: euro,
			SK: euro,
			
			JP: {
				currency: 'JPY',
				amount: 5000,
				pre: '¥',
				post: ''
			},
			
			US: {
				currency: 'USD',
				amount: 50,
				pre: '$',
				post: ''
			}
			
			// TODO: add the rest
			
		}
		var currencyCodeToCountry = new Array();
		
		function onLoad() {
			if (google.loader.ClientLocation.address.country_code != null) {
				code = google.loader.ClientLocation.address.country_code;
			} else {
				code = 'US';
			}
			changeLocation(code);
		}
		
		function changeLocation(code) {

			currencyCodeToCountry['GBP'] = 'GB';
			currencyCodeToCountry['USD'] = 'US';
			

			var currency = donationData[code];
			if(currency == undefined) {
				currency = donationData['US'];
			}
			document.getElementById('feature_amount').innerHTML = currency.pre + currency.amount + currency.post;
			
			var list = document.getElementById('currency_code');
			var in_list = false;
			for(var i = 0; i < list.length; i ++) {
				if(list.children[i].value == currency.currency) {
					list.children[i].selected = "selected";
					in_list = true;
				}
			}
			if(!in_list) {
				var index = list.options.length;
				list.options[index] = new Option(currency.currency + ' ' + currency.pre, currency.currency);
				list.options[index].selected = 'selected';
				currencyCodeToCountry[currency.currency] = code;
			}
			document.getElementById('amount').value = (currency.amount / 2);
			addEvent(document.getElementById('currency_code'), 'change', changeOptions);
			document.getElementById('amount').focus();	
		}
		
		var changeOptions = function() {
			var list = document.getElementById('currency_code');
			var value = list.options[list.selectedIndex].value;
			var code = currencyCodeToCountry[value];
			changeLocation(code);
		}
		

		function addEvent( obj, type, fn ) {
			if ( obj.attachEvent ) {
				obj['e'+type+fn] = fn;
				obj[type+fn] = function(){obj['e'+type+fn]( window.event );}
				obj.attachEvent( 'on'+type, obj[type+fn] );
			} else
				obj.addEventListener( type, fn, false );
		}
		
		google.setOnLoadCallback(onLoad);
		
		//]]>
	</script>
</head>
<body>
	<div id="wrapper">
		<h1>Thanks for updating Googlepedia!</h1>
		<h2>Getting Started</h2>
		<p>Just make a <a href="http://www.google.com/search?q=open source">Google search</a> and the related article will appear on the right.</p>
		
        <p><center><a href="http://www.facebook.com/pages/Googlepedia/204231432812"><img src="facebook.gif" /></center></a></p>
        
        <h2>Donate</h2>
		<p>Googlepedia is <a href="http://www.opensource.org/docs/osd">open source</a>! If you like Googlepedia, please support its development by donating via <b>PayPal</b> below. Thanks! :)</p>
		<p>
			<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post"  style="text-align: center">
				<input type="hidden" name="cmd" value="_xclick">
				<input type="hidden" name="business" value="rio@x5g.com">
				<input type="hidden" name="item_name" value="Googlepedia Donation">
				<select id="currency_code" name="currency_code">
					<option value="GBP">GBP £</option>
					<option value="USD" selected="selected">USD $</option>
				</select>
				<input id="amount" type="text" name="amount" class="value" value="50"/>
				<br clear="all" /><br clear="all" />
				<input type="submit" value="Donate &gt;" />
			</form>
		</p>
		<p><center><em>Donations of <span id="feature_amount">$50</span> or more will get you a special mention within the addon!<br />I will stop doing this soon to prevent the list getting too big, so get in quick!</em></center></p>
		<h2>Help and Support</h2>
		<p>If you are having issues, please <a href="http://code.google.com/p/googlepedia/issues/entry">submit a bug report</a>.</p>
		<p>Also please visit <a href="http://jameshall.tumblr.com">my blog</a> to see what I'm up to, or follow me on <a href="http://twitter.com/MrRio">Twitter</a>.</p>
		<iframe src="http://jhall.me/googlepedia-ad.html" width="600" height="200" allowtransparency="yes" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe>

		<!--
		<p><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=rio%40x5g%2ecom&item_name=Googlepedia&buyer_credit_promo_code=&buyer_credit_product_category=&buyer_credit_shipping_method=&buyer_credit_user_address_change=&no_shipping=0&no_note=1&tax=0&currency_code=GBP&lc=GB&bn=PP%2dDonationsBF&charset=UTF%2d8"><img src="http://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" alt="Donate" /></a></p>
		-->
	</div>
	<script type="text/javascript">
	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
	</script>
	<script type="text/javascript">
	try {
	var pageTracker = _gat._getTracker("UA-2746979-1");
	pageTracker._trackPageview();
	} catch(err) {}
	</script>	
</body>
</html>